package com.ruoyi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.ThisStockMapper;
import com.ruoyi.domain.ThisStock;
import com.ruoyi.service.IThisStockService;
import com.ruoyi.common.core.text.Convert;

/**
 * 本厂库存Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-07-06
 */
@Service
public class ThisStockServiceImpl implements IThisStockService 
{
    @Autowired
    private ThisStockMapper thisStockMapper;

    /**
     * 查询本厂库存
     * 
     * @param id 本厂库存ID
     * @return 本厂库存
     */
    @Override
    public ThisStock selectThisStockById(Long id)
    {
        return thisStockMapper.selectThisStockById(id);
    }

    /**
     * 查询本厂库存列表
     * 
     * @param thisStock 本厂库存
     * @return 本厂库存
     */
    @Override
    public List<ThisStock> selectThisStockList(ThisStock thisStock)
    {
        return thisStockMapper.selectThisStockList(thisStock);
    }

    /**
     * 新增本厂库存
     * 
     * @param thisStock 本厂库存
     * @return 结果
     */
    @Override
    public int insertThisStock(ThisStock thisStock)
    {
        return thisStockMapper.insertThisStock(thisStock);
    }

    /**
     * 修改本厂库存
     * 
     * @param thisStock 本厂库存
     * @return 结果
     */
    @Override
    public int updateThisStock(ThisStock thisStock)
    {
        return thisStockMapper.updateThisStock(thisStock);
    }

    /**
     * 删除本厂库存对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteThisStockByIds(String ids)
    {
        return thisStockMapper.deleteThisStockByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除本厂库存信息
     * 
     * @param id 本厂库存ID
     * @return 结果
     */
    @Override
    public int deleteThisStockById(Long id)
    {
        return thisStockMapper.deleteThisStockById(id);
    }

    @Override
    public ThisStock selectThisStockByIds(Long a, String name) {
        return thisStockMapper.selectThisStockByIds(a,name);
    }

    @Override
    public int updateThisStocks(long num,String name) {
        return thisStockMapper.updateThisStocks(num,name);
    }

    @Override
    public List<ThisStock> selectThisStockLists(Long sid) {
        return thisStockMapper.selectThisStockLists(sid);
    }

    @Override
    public ThisStock selectanme(String name) {
        return thisStockMapper.selectanme(name);
    }

    @Override
    public List<ThisStock> selectall(ThisStock thisStock) {
        return thisStockMapper.selectall(thisStock);
    }
}
